CC = g++
LD = g++
prog = libuser_handler.so
SRC = \
	ic_acceptor.cpp \
	ic_acceptor.h \
	ic_handler.cpp \
	ic_handler.h \
	music_acceptor.cpp \
	music_acceptor.h \
	music_handler.cpp \
	music_handler.h \
	web_acceptor.cpp \
	web_acceptor.h \
	web_handler.cpp \
	web_handler.h
OBJ = \
	ic_acceptor.o \
	ic_handler.o \
	music_acceptor.o \
	music_handler.o \
	web_acceptor.o \
	web_handler.o 

LDFLAGS = -shared -L../model -L../network/socket -lmodel -lboost_thread -lboost_regex -lsocket_cpp -lxml2 -L../network -lnetwork
CFLAGS = -std=c99 -g -fPIC -DPIC -fvar-tracking  -I/usr/include/libxml2

all: $(prog)

${prog}: $(OBJ)
	$(LD) $(LDFLAGS) $(OBJ) -o $(prog)

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm $(OBJ)
	rm $(prog)

run:
	./$(prog)
